import { createApp } from 'vue'
import { createPinia } from 'pinia'
import DataVVue3 from '@kjgl77/datav-vue3'
import Antd from 'ant-design-vue';
import { usePlcStore } from './stores/plc'
// 引入全局css
import './style.less';
import '@fortawesome/fontawesome-free/css/all.css'

import App from './App.vue'
import router from './router'

const app = createApp(App)
app.use(createPinia())
app.use(DataVVue3)
app.use(router)
app.use(Antd);

app.mount('#app')

// 在应用挂载后初始化 PLC 连接
const plcStore = usePlcStore()
plcStore.initSocket()
